Home:ALL Converter>How to test the page behind authentication in lighthouse report using gulp task?

How to test the page behind authentication in lighthouse report using gulp task?

Ask Time:2018-11-21T16:38:15         Author:user3697286

Json Formatter

I am automating the lighthouse report in chrome browser. But the URL I want to test is behind the authentication. so when I run the task it generates the lighthouse report for authentication page. How can I test the actual URL?

gulp.task("lighthouse", function () {
    return launchChromeAndRunLighthouse('http://localhost:8080/Template/GetTemplate?templateName=IndexDev', flags).then(results => {
        //  console.log(results);
        write(results, 'html', 'report.html')

    });
});

function launchChromeAndRunLighthouse(url, flags) {
    return chromeLauncher.launch().then(chrome => {
        flags.port = chrome.port;
        return lighthouse(url, flags).then();
    });
}

Author:user3697286,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/53408082/how-to-test-the-page-behind-authentication-in-lighthouse-report-using-gulp-task
yy